home *** CD-ROM | disk | FTP | other *** search
- /* prefs.c
- vi:ts=3 sw=3:
- */
- /* $Id: prefs.c,v 4.7 1995/02/08 13:14:56 espie Exp $
- * $Log: prefs.c,v $
- * Revision 4.7 1995/02/08 13:14:56 espie
- * *** empty log message ***
- *
- * Revision 4.7 1995/02/08 13:14:56 espie
- * *** empty log message ***
- *
- * Revision 4.6 1995/02/01 20:41:45 espie
- * Added color.
- *
- * Revision 4.6 1995/02/01 20:41:45 espie
- * Added color.
- *
- * Revision 4.5 1995/02/01 16:39:04 espie
- * *** empty log message ***
- *
- * Revision 4.5 1995/02/01 16:39:04 espie
- * *** empty log message ***
- *
- */
-
- #include "defs.h"
- #include "extern.h"
- #include "prefs.h"
- #include "tags.h"
-
- ID("$Id: prefs.c,v 4.7 1995/02/08 13:14:56 espie Exp $")
- LOCAL void init_prefs P((void));
-
- LOCAL void (*INIT)P((void)) = init_prefs;
-
- LOCAL struct tag preferences[NUMBER_PREFS];
-
- LOCAL void init_prefs()
- {
- int i;
-
- for (i = 0; i < NUMBER_PREFS; i++)
- preferences[i].type = BASE_PREFS + i;
- }
-
- VALUE get_pref(index)
- int index;
- {
- INIT_ONCE;
-
- return preferences[index-BASE_PREFS].data;
- }
-
- void set_pref(index, value)
- int index;
- VALUE value;
- {
- preferences[index-BASE_PREFS].data = value;
- }
-
- void set_pref_scalar(index, value)
- int index;
- int value;
- {
- VALUE temp;
-
- temp.scalar = value;
- set_pref(index, temp);
- }
-
- int get_pref_scalar(index)
- int index;
- {
- return get_pref(index).scalar;
- }
-
- struct tag *get_prefs()
- {
- INIT_ONCE;
-
- return preferences;
- }
-